[None][fix] Bypass the sync transfer-admission budget on the async disagg path#16834
Draft
Shixiaowei02 wants to merge 2 commits into
Draft
[None][fix] Bypass the sync transfer-admission budget on the async disagg path#16834Shixiaowei02 wants to merge 2 commits into
Shixiaowei02 wants to merge 2 commits into
Conversation
Shixiaowei02
requested review from
bo-nv,
cascade812,
chuangz0 and
tongyuantongyu
July 24, 2026 08:51
Shixiaowei02
marked this pull request as draft
July 24, 2026 08:57
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
WalkthroughChangesTransfer admission behavior
Executor runtime safeguards
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…rt cascade start_thread() restarted the already-finished await-response thread, raising "threads can only be started once" and masking the real cause: the engine event loop crashed (AwaitResponseHelper broadcasts _event_loop_error and returns, so the thread exits). The misleading RuntimeError then cascaded into a peer MPI-collective hang across ranks. Detect the finished thread and re-raise the stashed engine event-loop error instead. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
…s_in_buffer The DisaggTransferAdmissionController derives its in-flight transfer budget from max_tokens_in_buffer (a gather-buffer sizing knob), which for an 8k / high- concurrency config is only ~2 concurrent transfers per rank. That bound is meant for the SYNCHRONOUS transfer path (limit blocking transfers per executor iteration); on the ASYNC path transfers stay in flight and don't block, so applying it there serializes the ctx->gen handoff and backs requests up past kv_transfer_timeout_ms, failing them with "Disagg KV cache transfer error". Bypass the budget on the async path (already capacity-scheduled, so bounded by max_batch_size, matching v1/CPP behavior). Also harden _pad_attention_dp_dummy_request: a transient overshoot where KV-transfer-error requests briefly linger in active_requests (len > expected_num_active_requests) tripped a hard assert that crashed the gen loop on all ADP ranks. Warn and continue; the padding decision keys on the schedulable count. Signed-off-by: Shixiaowei02 <39303645+Shixiaowei02@users.noreply.github.com>
Shixiaowei02
force-pushed
the
user/xiaoweis/fix-disagg-async-transfer-throttle
branch
from
July 24, 2026 10:03
84fa5a5 to
6d1195c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request improves the robustness and concurrency handling of the disaggregated KV-cache transfer logic in
PyExecutor, and enhances test coverage for these scenarios. The main changes include allowing asynchronous transfer paths to bypass per-iteration transfer budgets, replacing a hard assertion with a warning to handle transient request overshoots, and updating related unit tests to cover these behaviors.Concurrency and transfer admission improvements:
_apply_disagg_transfer_admissioninpy_executor.pyto allow asynchronous disaggregated KV-cache transfers to bypass the per-iteration transfer budget, preventing unnecessary throttling and timeouts at high concurrency.start_threadofworker.py, added logic to prevent thread restarts after engine event loop crashes, surfacing the actual error instead of masking it.Robustness improvements:
_pad_attention_dp_dummy_requestwith a warning whenactive_requeststemporarily exceedsexpected_num_active_requests, preventing crashes during transient overshoots caused by lingering disagg transfer-error requests.Testing and coverage:
test_py_executor.pyto:Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.Dev Engineer Review
QA Engineer Review
Test functions added or modified:
test_apply_reverts_deferred_v2_allocationstest_apply_missing_v2_flag_defaults_to_non_v2test_async_mode_bypasses_transfer_budgettest_pad_dummy_tolerates_active_request_overshootThese are unit tests in
tests/unittest/_torch/executor/test_py_executor.py; no correspondingtest-db/orqa/test-list entries were added or modified.Verdict: sufficient